//
//  NSString+URL.m
//  unity
//
//  Created by lanou3g on 15/7/16.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "NSString+URL.h"

@implementation NSString (URL)
- (NSString *)URLEncodedString
{
    NSString *encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
                                                                                  (CFStringRef)self,
                                                                                  (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]",
                                                                                  NULL,
                                                                                  kCFStringEncodingUTF8);  
    return encodedString;
    
}


@end
